<template>
  <div class="rank_right">
    <b-row>
      <div class="col-xs-3">
        <b-button class="btn-block" v-on:click="tuijian(13)">最新新闻</b-button>
      </div>
      <div class="col-xs-3">
        <b-button class="btn-block" v-on:click="tuijian(7)">国内新闻</b-button>
      </div>
      <div class="col-xs-3">
        <b-button class="btn-block" v-on:click="tuijian(13)">宗座动态</b-button>
      </div>
      <div class="col-xs-3">
        <b-button class="btn-block" v-on:click="tuijian(14)">普世教会</b-button>
      </div>
    </b-row>
    <div>
      <b-list-group>

  <b-list-group-item v-for="item in newsList" :key="item.id">{{item.title}}</b-list-group-item>
</b-list-group>
 <b-button>更多</b-button>
    </div>
  </div>
</template>

<script>
// @ is an alias to /src
export default {
  name: "rankRight",
  data() {
    return {
      newsList:[],
      limit: 5,
    };
  },
  created() {
   this.tuijian(13);
  },
  mounted() {
    //this.get_list();
  },
  methods: {
    
    tuijian: function(val){
      let that =this;
      that.axios.post('/api/index/getList', {
          catid: val,
          limit: that.limit
        })
        .then(function(res) {
         that.newsList = res.data.list;
        })
        .catch(function(error) {
          console.log(error);
        });
    }
  }
};
</script>
